//
//  UUPersistenceManager.h
//  Whistle
//
//  Created by ZhangAo on 17/01/2018.
//  Copyright © 2018 BookSir. All rights reserved.
//

#import <Foundation/Foundation.h>

#define GetPersistenceManager()             ([UUPersistenceManager sharedInstance])

@interface UUPersistenceManager : NSObject

+ (instancetype)sharedInstance;

@property (nonatomic, readonly) NSString *userPrivatePath;
@property (nonatomic, readonly) NSString *userPrivateDBPath;
@property (nonatomic, readonly) NSString *userPrivateCachePath;
@property (nonatomic, readonly) NSMutableDictionary *userPrivateDefaults;

@property (nonatomic, readonly) NSString *commonPath;
@property (nonatomic, readonly) NSMutableDictionary *commonDefaults;

+ (void)setUserIdRequestBlock:(id (^)(void))requestBlock;

// 返回所有 defaults 的名称
- (NSArray<NSString *> *)storedSuiteNames;

// 清除缓存的 defaults 链接
- (void)clear;

@end
